package text_2023_09_20;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/20 16:38:01
 */

class Citizen{
    private int id;
    private String name;
    public Citizen(int id,String name){
        this.id = id;
        this.name = name;
    }
    public boolean equals(Object o){
        if(this == o){
            return true;
        }
        if(o == null){
            return false;
        }
        if(getClass() != o.getClass()){
            return false;
        }
        Citizen other = (Citizen)o;
        return this.id == other.id && this.name.equals(other.name);
    }
}

class MyCircle{
    private int radius;
    public MyCircle(int radius){
        this.radius = radius;
    }
    public int getRadius(){
        return radius;
    }
    public void setRadius(int r){
        radius = r;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj == null){
            return false;
        }
        if(this == obj){
            return true;
        }
        if(getClass() != obj.getClass()){
            return false;
        }
        return ((MyCircle) obj).radius == this.radius;
    }
}
public class TestJavaAPI {

    public static void main(String[] args) {
        Object o = new String("000");
        System.out.println(o.getClass());
        String a = "0100";
        int n = Integer.parseInt(a);
        System.out.println(n);
    }
}
